﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using XZL.GM.Bll;
using XZL.GM.Dal;

public partial class User_UserBuy : AdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindUserBuy();
        }
    }

    private void BindUserBuy()
    {

        int? count = 0;
        string str = Request.QueryString["UserID"];

        gridList.DataSource = UserInfoBiz.GetUserCourse(str, 1, netPager.CurrentPageIndex, netPager.PageSize, ref count);
        gridList.DataBind();
        netPager.RecordCount = count.Value;
    }


    /// <summary>
    /// 分页控件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void netPager_PageChanged(object sender, EventArgs e)
    {
        BindUserBuy();
    }

    protected void btnSelect_Click(object sender, EventArgs e)
    {
        BindUserBuy();
        netPager.CurrentPageIndex = 1;
    }
}